{% extends 'base.html' %}
{% load static %}
{% block css %}  
    <link rel="stylesheet" href="{% static '/plugins/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css' %}"/>
		<script src="{% static 'plugins/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.min.js' %}"></script>
		<script src="{% static 'plugins/bootstrap-datetimepicker-master/js/locales/bootstrap-datetimepicker.zh-CN.js' %}">
		</script>
    
    {% endblock css%}
      {% block body %}
      <div>
        <div class="container">
            <div class="panel panel-default" style="background-color: rgb(241, 238, 233);">
                    <div class="panel-heading">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="/user/list/">员工信息</a></li>
                            <li class="breadcrumb-item active" aria-current="page">编辑员工：</li>
                        </ol>
                    </div>
                    <div style="display: flex;justify-content: center;">
                        <div >
                            <form method="post" novalidate>
                                {% csrf_token %}
                                    {% for item in form %}
                                    <div>
                                        <div style="display: inline-block;">
                                            {{item.label}}:{{item}}
                                        </div>
                                            <span style="color: red;">{{item.errors.0}}</span>
                                    </div>
                                    {% endfor %}
                                <div style="margin-top: 10px;">
                                    <a style="color: black;" href="/user/list/"><input type="button" value="取消"></a>
                                    <a style="color: black;" >
                                        <input style="margin-left: 145px;" type="submit" value="保存"><br/>
                                    </a>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
        </div>
    </div>
      {% endblock body %}
      {% endblock body %}
      {% block js %}
      <script>
          $('#id_create_time').datetimepicker({
                      language: 'zh-CN', //显示中文
                      format: 'yyyy-mm-dd', //显示格式
                      autoclose: true, //选中自动关闭
                      todayBtn: true, //显示今日按钮
                      todayHighlight: true, // 今日高亮显示
                      weekStart: 1, //一周从哪一天开始。0（星期日）到6（星期六）	
                      startDate: "2021-1-1", //日期选取的起始时间
                      minView: "month", // 最小视图为月份，如果为 day 的话还会让你选小时
                      daysOfWeekDisabled: '0', // 哪天不可选 0（星期日）到6（星期六）	
                      endDate: new Date(), //日期选取的截止时间，因为入职日期最多填写到今天，所以可以直接用new Date()，表示当天
                  })
      </script>
      {% endblock js%}